﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BanquetGift.Models
{
    /// <summary>
    /// 份子钱簿子
    /// </summary>
    [Table("moneyBook")]
    public class MoneyBook : BaseModel<int>
    {
        /// <summary>
        /// 酒宴类型 ID
        /// </summary>
        [Display(Name = "酒宴类型 ID")]
        [Required(ErrorMessage = "请选择酒宴类型")]
        public int BanquetType { get; set; }
        /// <summary>
        /// 送还类型 ID
        /// </summary>
        [Display(Name = "送还类型 ID")]
        [Required(ErrorMessage = "请选择送还类型")]
        public int BorrowOrLend { get; set; }
        /// <summary>
        /// 份子人 ID
        /// </summary>
        [Display(Name = "份子人 ID")]
        [Required(ErrorMessage = "请选择份子人")]
        public int GiftPeopleId { get; set; }
        /// <summary>
        /// 份子钱金额
        /// </summary>
        [Display(Name = "份子钱金额")]
        [Required(ErrorMessage = "请输入份子钱金额")]
        [Column(TypeName = "decimal(18, 2)")]
        public decimal Money { get; set; }
        /// <summary>
        /// 份子钱的描述
        /// </summary>
        [Display(Name = "父级 Id")]
        [MaxLength(200, ErrorMessage = "描述最大长度 200 个字")]
        public string Description { get; set; }
    }
}
